export default class RecommendService {
	constructor(vm) {
		this.$u = vm
	}
	
	async lunboList(module_service_js) {
		try {
			const res = await this.$u.get("/product/lunboList")
			if (!res || res?.error_code != 0) {
				throw new Error(res.msg || "请求失败");
			}
			module_service_js.setRefresh(res?.result)
		} catch (e) {
			throw e;
		}
	}
	async cateList(module_service_js) {
		try {
			const res = await this.$u.get("/product/cateList")
			if (!res || res?.error_code != 0) {
				throw new Error(res.msg || "请求失败");
			}
			module_service_js.setRefresh(res?.result)
		} catch (e) {
			throw e;
		}
	}
	
	async cateProductList(module_service_js) {
		try {
			const res = await this.$u.get("/product/cateProductList")
			if (!res || res?.error_code != 0) {
				throw new Error(res.msg || "请求失败");
			}
			module_service_js.setRefresh(res?.result)
		} catch (e) {
			throw e;
		}
	}
}
